package com.zzs.library.nosql.elasticsearch.repository;

import com.zzs.library.nosql.elasticsearch.document.EsBook;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * @Author ZechariahZheng
 * @Date 2020/1/7 9:40
 * @Version 1.0
 * @description 图书ES操作类
 */
public interface EsBookRepository extends ElasticsearchRepository<EsBook, Long> {
    /**
     *
     * @param name          小说名称
     * @param auth          作者
     * @param brief         简介
     * @param page          分页信息
     * @return
     */
    Page<EsBook> findByNameOrAuthOrBrief(String name, String auth, String brief, Pageable page);
}
